import {HttpClient, HttpParams, HttpRequest} from '@angular/common/http';
import { Injectable } from '@angular/core';
import {Observable} from "rxjs/Observable";

/*
  Generated class for the CommissionProvider provider.

  See https://angular.io/guide/dependency-injection for more info on providers
  and Angular DI.
*/
@Injectable()
export class CommissionProvider {

  constructor(public http: HttpClient) {

  }

  getCommissionPDF(timeSegment: number, time: string) {;
      let url = `/achieve/commission/v1/pdf/downLoad?timeSegment=${timeSegment}&time=${time}`;;
      return this.http.get(url,  {observe:'events',responseType: 'blob',reportProgress:true});;
  }

}
